import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServlet;


public class Utility {

	/**
	 * @param args
	 */
	public static String getFileName(HttpServlet servlet)
    {
    	ServletContext servletContext  = servlet.getServletContext();
   		InputStream is = servletContext.getResourceAsStream("/WEB-INF/LogFile.properties");
   		Properties props = new Properties();
   		try {
			props.load(is);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
   		String logDir = props.getProperty("logPath", "C:\\Downloads");
		
	    String logFile = logDir + "someText.txt";
		return logFile;
   	}

}
